<include file="Public:header" />
<div class="container main"> <include file="Public:left" />

  <div class="w790">
    <div class="h">
        <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'add')">
        <a href="{:U('add')}" class="btn btn-info">
            <i class="glyphicon glyphicon-plus"></i>新增供货商
        </a>
        </if>
      <form action="{:U('index')}" method="get" class="fr form-inline" id="myform">
          <select class="form-control" name="type" id="type" onchange="$('#myform').submit();">
              <option value="">请选择供货商类型</option>
              <option value="1" <eq name="type" value="1">selected</eq> >线上</option>
              <option value="2" <eq name="type" value="2">selected</eq> >线下</option>
          </select>
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="搜索店名、会员ID或会员名" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
        <div class="clearfix"></div>
    </div>
     <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td height="21" align="center">ID</td>
    <td align="center">商家店名</td>
     <td align="center">类型</td>
    <td align="center">推荐关系</td>
     <td align="center">联系人</td>
    <td align="center">电话</td>
    <td align="center">详细地址</td>
    <td align="center">提交时间</td>
    <td align="center">状态</td>
    <td align="center">账户资金</td>
     <td align="center">会员ID</td>
     <td align="center">会员名称</td>
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
    <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}</td>
    <td>{$vo.susername}</td>
    <td align="center"><notempty name="vo['affname']"><span style="color:#f60;">{$vo.affname}</span> ->推荐-> <span style="color:#f60;">{$vo.membername}</span><else/>无</notempty></td>
    <td style="width:50px"><switch name="vo.type"><case value="1">线上</case><case value="2">线下</case></switch></td>
    <td>{$vo.contacts}</td>
    <td align="center">{$vo.sphone}</td>
    <td>{$vo.saddress}</td>
    <td align="center">{:date('Y-m-d H:i:s',$vo['datetime'])}</td>
    <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span>
                <else/>
                <span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
    <td align="center">
      <notempty name='vo.money'>
        ￥{$vo.money}
        <else /> 
      </notempty></td>
    <td align="center">
        {$vo.membernumber}
    </td>
        <td align="center">{$vo.membername}</td>
    <td align="center">
    
    <if condition="getAccessMenu($accessList, 'Admin', 'Supplier_account_log', 'index')">
    <a href="{:U('Supplier_account_log/index', array('supplier_id' => $vo['id']))}">资金明细</a> |
    </if>
    <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'selectUser')">
        <a href="javascript:void(0);" onclick="mydialog.open('{:U('selectUser',array('id' => $vo['id']))}', {width: 800, height: 500,lock:true,title:'编辑用户'})">管理员列表</a> |
    </if>
     <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'edit')">
         <a href="{:U('edit',array('id'=>$vo['id']))}">编辑</a> |
     </if>
     <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'delete')">
         <a href="{:U('delete',array('id'=>$vo['id']))}"  onclick="return confirm('您确定要删除这条记录吗？');">删除</a>
     </if>
      </td>
  </tr>
</volist>
  
</table></div>
<div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="update_sort('id','sort','','{:U('dosort')}');"><i class="glyphicon glyphicon-refresh"></i> 更新排序</a> 
        
       
        
    </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
  </div>
  <div class="clear"></div>
</div>
</body></html>